package com.tanjun.mallservice.web.service;

import com.mybatisflex.core.service.IService;
import com.tanjun.mallservice.apiservice.enums.plu.PluDescTypeEnum;
import com.tanjun.mallservice.web.orm.entity.MallPluDesc;
import org.springframework.lang.Nullable;

import jakarta.validation.constraints.NotNull;

/**
 * @author jjtan
 * @description 针对表【mall_plu_desc(商品说明)】的数据库操作Service
 * @createDate 2024-03-22 10:33:45
 */
public interface MallPluDescService extends IService<MallPluDesc> {
    /**
     * 获取详细说明
     *
     * @param pluId    商品id
     * @param skuId    规格id
     * @param typeEnum 类型
     * @return 详细说明
     */
    String getDescInfo(@NotNull Long pluId, @Nullable Long skuId, @NotNull PluDescTypeEnum typeEnum);

    /**
     * 保存详细说明
     *
     * @param pluId    商品id
     * @param skuId    规格id
     * @param typeEnum 类型
     */
    void saveDescInfo(@NotNull Long pluId, @Nullable Long skuId, @NotNull PluDescTypeEnum typeEnum, String desc);
}
